package java06;
import java.util.Map;
import java.util.HashMap;
public class HashMapTest04 {
    public static void main(String[] args){
        Map map = new HashMap();
        map.put("1","Jack");
        map.put("2","Rose");
        map.put("3","Luck");
        System.out.println(map);
        //使用forEach(BiConsumer action)方法遍历集合
        map.forEach((key,value) -> System.out.println(key + ":" +value));
    }
}
